package Chapter2;

//41页程序 2.2
/*说明变量屏蔽及作用域的实例*/
//最外层变量name是Customer类的成员变量，类内及其子类可访问，而第10，14行的name是局部变量，作用域不同互不影响
public class Customer {

    public static void main(String[] args) {
        Customer customer = new Customer();
        {
            customer.name = "Tom";
            System.out.println("The customer's :"+customer.name);
        }
        customer.name = "john";
        System.out.println("The customer's :"+customer.name);
    }
    private String name;
}